/**
 * de.herberlin.sudoku.FieldFactory
 */
package de.herberlin.sudoku;

import de.herberlin.sudoku.gui.ButtonField;

/**
 * @author herberlin
 * @created 01.07.2006
 */
public abstract class FieldFactory {

	private static FieldFactory _instance = null;;

	public static FieldFactory getInstance() {
		if (_instance == null) {
			_instance = new DefaultFieldFactory();
		}
		return _instance;
	}

	public abstract Field getField(int x, int y);

	private static class DefaultFieldFactory extends FieldFactory {

		public Field getField(int x, int y) {
			return new ButtonField(x,y);
		}

	}

}
